<template>
	<view style="padding: 30rpx;">
		<!-- <view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item title="企业名称" :value="item.enterpriseName"></u-cell-item>
		</view> -->
		 
		<view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item title="车主姓名" :value="car.ownName | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="车主电话" :value="car.ownerPhone | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="车辆名称" :value="car.name | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="车牌号" :value="car.plate | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="车牌颜色" :value="car.plateColor | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="车辆承载吨数" :value="car.carLoadBearing | nullText" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item v-if="car.carUsageStatus==0" title="车辆使用状态" value="空闲中" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item v-if="car.carUsageStatus==1" title="车辆使用状态" value="使用中" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item v-if="car.carUsageStatus==2" title="车辆使用状态" value="维修中" :arrow="false" hover-class="none"></u-cell-item>
			<u-cell-item title="备注" :value="car.contact | nullText" :arrow="false" hover-class="none"></u-cell-item>
		</view>
		<!-- <view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item title="车辆类型" :value="item.vehicleType"></u-cell-item>
			<u-cell-item title="车身颜色" :value="item.vehicleColor"></u-cell-item>
			<u-cell-item title="货厢体积m³" :value="item.cargoVolume"></u-cell-item>
			<u-cell-item title="车架号" :value="item.vin"></u-cell-item>
			<u-cell-item title="车辆承载吨数" :value="item.carLoadBearing"></u-cell-item>
			<u-cell-item title="专用号牌" :value="item.specialLicensePlate"></u-cell-item>
			<u-cell-item title="车辆星标" :value="item.vehicleStar"></u-cell-item>
			<u-cell-item title="车辆品牌" :value="item.vehicleBrand"></u-cell-item>
			<u-cell-item title="车辆型号" :value="item.vehicleModel"></u-cell-item>
			<u-cell-item title="车辆新旧" :value="item.vehicleAge"></u-cell-item>
			<u-cell-item title="经销商" :value="item.dealer"></u-cell-item>
			<u-cell-item title="出厂日期" :value="item.productionDate"></u-cell-item>
			<u-cell-item title="年检时间" :value="item.annualInspectionDate"></u-cell-item>
			<u-cell-item title="有效期至" :value="item.validUntil"></u-cell-item>
			<u-cell-item title="注册日期" :value="item.registrationDate"></u-cell-item>
			<u-cell-item title="淘汰日期" :value="item.eliminationDate"></u-cell-item>
		</view>
		<view style="background-color: #fff;border-radius: 16rpx;">
			<u-cell-item title="准运开关证件" :value="item.licenseAttachment"></u-cell-item>
			<u-cell-item title="其他" :value="item.otherAttachment"></u-cell-item>
			<u-cell-item title="车身照片" :value="item.vehiclePhotoAttachment"></u-cell-item>
			<u-cell-item title="车辆登记证" :value="item.vehicleRegistrationAttachment"></u-cell-item>
			<u-cell-item title="货箱照片" :value="item.cargoBoxPhotoAttachment"></u-cell-item>
			<u-cell-item title="车辆行驶证" :value="item.vehicleDrivingLicenseAttachment"></u-cell-item>
			<u-cell-item title="备注" :value="item.remark"></u-cell-item>
		</view>
		<view style="background-color: #fff;border-radius: 16rpx;">
			0空闲中 1.使用中2.维修中
			<u-cell-item title="车辆使用状态" :value="item.carUsageStatus"></u-cell-item>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				car: '',
				carId: ''
			}
		},
		filters:{
			nullText(v){
				if(v==null||v=='null'||!v){
					return v = ''
				}else{
					return v
				}
			}
		},
		onLoad(opt) {
			this.carId = opt.carId
			this.getCar()
		},
		methods: {
			getCar() {
				this.$u.get(`/manger/vehicleinfo/${this.carId}`).then(res => {
					if(res.code==200){
						this.car = res.data
					}
				})
			}
		}
	}
</script>

<style>

</style>